<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:p="http://primefaces.org/ui"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions">

<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<link rel="stylesheet"
		href="../resources/css/smoothness/jquery-ui-1.8.16.custom.css"
		type="text/css" />
	<script language="javascript" type="text/javascript"
		src="../resources/js/default.js"></script>
	<title>Professor</title>
</h:head>
<h:body>

	<h:form id="formularioFuncione">
		<fieldset>

			<legend>Seja Bem-vindo ao Portal do Professor</legend>
			<p:toolbar>
				<p:toolbarGroup align="left">


					<p:commandButton id="modalDialogButtonDadosProfessor"
						value="Dados Pessoais" image="ui-icon-person"
						onclick="dlg0.show();" type="button" />
					<p:dialog id="modalDialogProfessor" header="Dados Pessoais"
						widgetVar="dlg0" modal="true" height="360" width="600">

						<h:form prependId="false">

							<h:messages />
							<h:panelGrid columns="2">



								<h:outputText value="Basic Input: " />
								<p:inplace id="basic">
									<p:inputText value="Edit Me" />
								</p:inplace>

								<f:facet name="footer">
									<p:commandButton type="button" action="#{usuarioBean.salvar}"
										value="Salvar" icon="ui-icon-check" />
								</f:facet>

							</h:panelGrid>
						</h:form>
					</p:dialog>


					<p:commandButton id="modalDialogButton" value="Chamada"
						onclick="dlg2.show();" type="button" image="ui-icon-disk" />

					<p:dialog id="modalDialog" header="Chamada" widgetVar="dlg2"
						modal="true" height="360" width="600">

						<p:dataTable var="disciplina" value="#{disciplinaBean.lista}"
							styleClass="datagrid" rows="12" paginator="true" effect="true"
							paginatorTemplate=" {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
							rowsPerPageTemplate="6,9,12,15">
							<!-- Lista as disciplinas ver como pegar somente as que o professor ministra  -->
							<p:column>
						
								<p:commandLink value="#{disciplina.nome}" action="chamada"
									ajax="false">
									<f:param name="id" value="#{disciplina.id}"></f:param>
								</p:commandLink>
							</p:column>
						</p:dataTable>

					</p:dialog>

					<p:commandButton id="modalNotas" value="Notas" image="ui-icon-folder-open" onclick="dlg3.show();" type="button"/>
						<p:dialog id="modalDialogNotas" header="Chamada" widgetVar="dlg3"
						modal="true" height="360" width="600">

						<p:dataTable var="disciplina" value="#{disciplinaBean.lista}"
							styleClass="datagrid" rows="12" paginator="true" effect="true"
							paginatorTemplate=" {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
							rowsPerPageTemplate="6,9,12,15">
							<!-- Lista as disciplinas ver como pegar somente as que o professor ministra  -->
							<p:column>
								<p:commandLink value="#{disciplina.nome}" action="notas"
									ajax="false">
									<f:param name="id" value="#{disciplina.id}"></f:param>
								</p:commandLink>
							</p:column>
						</p:dataTable>

					</p:dialog>


				</p:toolbarGroup>
				<p:toolbarGroup align="right">
					<p:commandButton value="Sair" image="ui-icon-power" />
				</p:toolbarGroup>
			</p:toolbar>
			<p:messages />

		</fieldset>
	</h:form>

</h:body>
</html>